Exists
TheExists
method returns a Boolean value that indicates whether the specified focus context exists in this storage unit.
ODBoolean Exists (in ODPropertyName propertyName, in ODValueType valueType, in ODValueIndex valueIndex);
propertyName
- The name of the property in the focus context, or
kODNULL
for the currently focused property.valueType
- The value type of the value in the focus context, or
kODNULL
to ignore this parameter.valueIndex
- The value index of the value in the focus context, or 0 to ignore this parameter.
- return value
kODTrue
if the specified focus context exists in this storage unit, otherwisekODFalse
.DISCUSSION
You can call this method to see whether you can focus this storage unit on the specified focus context; however, this method does not change the current focus context. The parameters specify the focus context to be checked.
If this method returns true, it is safe to call the
- To specify a property as the focus context, pass its name as the property name parameter or
kODNULL
for the currently focused property. PasskODTypeAll
as the value type parameter andkODIndexAll
as the value index parameter.- To specify a value as the focus context, pass the name of the property containing the value as the property name parameter or
kODNULL
for the currently focused property. You can specify the value by either its type or its index:
- To use type, pass the type of the desired value as the value type parameter and 0 as the value index parameter.
- To use index, pass
kODNULL
as the value type parameter and the index of the desired value as the value index parameter.
Focus
method with the specified focus context.EXCEPTIONS
kODErrIllegalPropertyName
- The specified property name is improperly formed or illegal.
kODErrInvalidValueType
- The specified value type is improperly formed or illegal.
kODErrZeroRefCount
- This storage unit has a reference count of 0.
SEE ALSO
TheODPropertyName
type (page 904).
TheODValueIndex
type (page 904).
TheODValueType
type (page 904).
TheODStorageUnit::ExistsWithCursor
method (page 682).
TheODStorageUnit::Focus
method (page 684).
Listing 2-41 on page 100 in OpenDoc Cookbook.
Listing 2-44 on page 105 in OpenDoc Cookbook.
Listing 2-45 on page 106 in OpenDoc Cookbook.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help